Skip to content

Fix drag-and-drop files into terminal#54

Merged
dhilgaertner merged 2 commits intomainfrom
feature/crow-51-drag-drop-photo
Apr 5, 2026
Merged

Fix drag-and-drop files into terminal#54
dhilgaertner merged 2 commits intomainfrom
feature/crow-51-drag-drop-photo

Conversation

@dhilgaertner
Copy link
Copy Markdown
Contributor

@dhilgaertner dhilgaertner commented Apr 5, 2026

Summary

  • Register GhosttySurfaceView for .fileURL drag types and implement NSDraggingDestination
  • Dragging files from Finder onto the terminal now types their shell-escaped paths at the cursor
  • Paths with spaces/special characters are single-quote wrapped; clean paths are left bare

Closes #51

Test plan

  • Drag a single file from Finder onto a terminal — path appears at cursor
  • Drag a file with spaces in its name — path is single-quoted
  • Drag multiple files — space-separated escaped paths
  • Drag non-file content (e.g., image data from browser) — drop is rejected
  • Cmd+V paste still works
  • Mouse text selection in terminal still works

🤖 Generated with Claude Code

dhilgaertner and others added 2 commits April 5, 2026 14:27
Register GhosttySurfaceView for file URL drag types and implement
NSDraggingDestination so dragging files from Finder types their
shell-escaped paths into the terminal — matching standalone terminal
behavior.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dhilgaertner dhilgaertner merged commit 043e891 into main Apr 5, 2026
2 checks passed
@dhilgaertner dhilgaertner deleted the feature/crow-51-drag-drop-photo branch April 5, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot drag and drop a photo into claude code

1 participant